<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>02_项目排布</title>
    <style>
        .box {
            height: 400px;
            background-color: lightblue;
            display: flex;
            /* 子元素在主轴上的排布方式 */
            justify-content: flex-start; /* 主轴起点对齐 */
            justify-content: flex-end; /* 主轴终点对齐 */
            justify-content: center; /* 主轴居中对齐 */
            justify-content: space-between; /* 主轴两端对齐:首尾元素贴边,剩余空间均分 */
            justify-content: space-around; /* 主轴环绕对齐:每个元素左右两侧的间距都是a */
            justify-content: space-evenly; /* 主轴公平对齐:所有间隙等分 */

            /* 交叉轴:永远垂直于主轴的轴,此属性控制元素在交叉轴上的排布方式 */
            align-items: flex-start;/* 交叉轴起点对齐 */
            align-items: flex-end;/* 交叉轴终点对齐 */
            align-items: center;/* 交叉轴居中对齐 */
        }

        .item {
            width: 100px;
            height: 100px;
            border: 2px solid #f00;
            background-color: pink;
        }
    </style>
</head>
<body>
<div class="box">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
</div>
</body>
</html>